/*
 * Copyright (C) 2013 Shanghai Paibo soft Co., Ltd
 *
 * All copyrights reserved by dalinggong.com
 * Any copying, transferring or any other usage is prohibited.
 * Or else, Shanghai Paibo possesses the right to require legal 
 * responsibilities from the violator.
 * All third-party contributions are distributed under license by
 * dalinggong soft Co., Ltd.
 */
package com.dlg.commons.util;

import org.apache.commons.lang3.RandomUtils;

/**
 * @author jiangchangcheng  2017年4月6日 下午1:52:26
 * @since JDK 1.7	
 */
public enum VerifyCodeUtils {
	instance;
	
	/**
	 * 生成验证码
	 * @param digitNumber 验证码位数
	 * @return
	 */
	public String getVerifyCode(int digitNumber){
		String verifyCode = "";
		for(int i = 0; i < digitNumber; i++){
			verifyCode += RandomUtils.nextInt(0, 9);
		}
		return verifyCode;
	}
	
}
